Skip to content

feat: 홈 화면 내 주변 SPOT 영역 추가 #105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 10, 2024
Merged

feat: 홈 화면 내 주변 SPOT 영역 추가 #105

merged 5 commits into from
Oct 10, 2024

Conversation

HBSPS
Copy link
Contributor

@HBSPS HBSPS commented Oct 9, 2024

  • useLocation 커스텀 훅 분리
  • 추천 여행지 이미지 너비 수정
  • 홈 화면 내 주변 SPOT 영역 추가

TODO

  • 현재 홈화면 접근 시 아래와 같은 문제 발생
suspense.mp4

원인

  1. 처음 location이 undefined인 상태로 렌더링
  2. 화면이 준비되고 렌더링됨 (이때 location은 undefined)
  3. location이 업데이트 됨 (권한 허용의 경우)
  4. location이 업데이트 되며 useNeearbySpotQuery 재실행
  5. 다시 로딩 화면 출력 및 데이터 요청
  6. 페이지 완성

시도 해본 것

  • useSuspenseQueries = 재 요청이 가는 조건이 location 상태의 변경이므로 유효하지 않음 (처음에는 waterfall이 원인인줄 알았음)
  • 홈 화면에 약 1초의 delay 걸기 = 말이 안됨
  • location의 기본 값 설정 = 기본 위치는 어디로 할 것인지 + 사용자의 권한이 없다면 현재 증상과 반대로 기존에 있던 내 주변 SPOT! 영역이 사라지는 현상이 발생할 수 있음

해결 방법

  1. location을 전역 상태로 변경 및 splash에서 location 업데이트를 수행 - 홈 화면 진입 시 (권한이 있다면) location 정보가 존재하도록 만들기
  2. 다른 방법?

@HBSPS HBSPS added feat 새로운 기능 추가 fix 수정 labels Oct 9, 2024
@HBSPS HBSPS requested a review from d0422 October 9, 2024 07:18
@HBSPS HBSPS self-assigned this Oct 9, 2024
Copy link
Contributor

@d0422 d0422 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다!

@d0422 d0422 merged commit 0444939 into main Oct 10, 2024
1 check passed
@d0422 d0422 deleted the fix/qa branch October 10, 2024 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat 새로운 기능 추가 fix 수정
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants